package loan.calc.constant.dict;

import lombok.AllArgsConstructor;
import lombok.Getter;
import loan.calc.constant.dict.rate.RateTypeEnum;

import static loan.calc.constant.dict.rate.RateTypeEnum.*;

/**
 * 金额类型枚举类
 *
 * @author Liusuo Dong
 * @date 2020/10/10
 */
@Getter
@AllArgsConstructor
public enum AmountTypeEnum {
    /**
     * 本金金额
     */
    PRINCIPAL("01", "本金金额", null),
    /**
     * 利息金额
     */
    INTEREST("02", "利息金额", NORMAL_RATE),
    /**
     * 本金罚息
     */
    PRINCIPAL_PENALTY("31", "本金罚息", PRINCIPAL_PENALTY_RATE),
    /**
     * 利息罚息
     */
    INTEREST_PENALTY("32", "利息罚息", INTEREST_PENALTY_RATE),
    ;

    /**
     * 码值
     */
    private final String code;
    /**
     * 描述
     */
    private final String description;
    /**
     * 产生该金额的利率类型
     */
    private final RateTypeEnum rateType;

}
